import requests
import json


def main():
    url = "https://qianfan.baidubce.com/v2/app/conversation/runs"

    payload = json.dumps({
        "app_id": "9f764386-c0cd-470f-a77b-5a68ec73a8d7",
        "query": "你好",
        "stream": False,
        "conversation_id": "ec797ca0-14d9-46b5-acfe-08bbb7907a4e"
    })
    headers = {
        'Content-Type': 'application/json',
        'X-Appbuilder-Authorization': 'Bearer bce-v3/ALTAK-2S24NrBjAflOzfQwpUmil/32feadb7e5a066dc7fda326c38d431207782e527'
    }

    response = requests.request("POST", url, headers=headers, data=payload)

    print(response.text)


if __name__ == '__main__':
    main()
